﻿#ifndef BIZEDITORDIALOG_H
#define BIZEDITORDIALOG_H

#include "common/baseeditordialog.h"
#include "m_function.h"

class BizEditorDialog : public BaseEditorDialog
{
public:
    explicit BizEditorDialog(QWidget *parent = 0);

    void updateMenu();
    void updateView();

    void updateViewUnfinish();
    void updateViewMonth();
    void updateViewAll();

    virtual void setHeaderData() = 0;
    virtual void edit_on() = 0;
    virtual void edit_off() = 0;
    virtual void en_finish() = 0;
    virtual void en_remove() = 0;

    virtual void newItem() = 0;
    virtual void removeItem(const QModelIndex &index);
    virtual void finishItemDirect(const QString &table, int id);
    virtual void cancelItemDirect(const QString &table,int id);

    void search();

    int getId(const QString &table, const QString &uid) const;
    void changeStatus(const QString &table, const QString &status, int id);
    QString getStatus(const QString &table, int id) const;

    void sendMsg(const QString &title, const QString &content);

protected:
    int indicator;
    QString part;
};

#endif // BIZEDITORDIALOG_H
